<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mall/Hotels.js此处编写
 -->
 <template>
  <div>
    <view-grid
      ref="grid"
      :columns="columns"
      :detail="detail"
      :editFormFields="editFormFields"
      :editFormFileds="editFormFields"
      :editFormOptions="editFormOptions"
      :searchFormFields="searchFormFields"
      :searchFormFileds="searchFormFields"
      :searchFormOptions="searchFormOptions"
      :table="table"
      :extend="extend"
    >
    </view-grid>
  </div>
</template>

<script>
import extend from "@/extension/mall/Hotels.js";
import ViewGrid from "@/components/basic/ViewGrid.vue";
var vueParam = {
  components: {
    ViewGrid
  },
  data() {
    return {
      table: {
        key: "hotelid",
        footer: "Foots",
        cnName: "酒店管理",
        name: "Hotels",
        url: "/Hotels/",
        sortName: "createDate"
      },
      extend: extend,
      editFormFields: {
        supplier_Name: "",
        hotel_Type: "",
        hotel_Name: "",
        hotel_ID: "",
        hotel_Image: [],
        HOTELDETAILADDRESS: "",
        HOTELDETAILADDRESS2: "",
        reception_Phone: "",
        hotel_Introduction: "",
        hotel_State: "",
        describes: "",
        hotelid: "",
        supplier_Code: "",
        modifier: "",
        modifyDate: "",
        modifyID: "",
        createDate: "",
        createID: "",
        creator: "",
        merchantCode: "",
        merchantName: "",
        session: "",
        // city:""
        is_open: "",
        distributorNews_id: "",
        isShowRoomDetails: "",
        dy_hotel_ID: "",
        distributorCode: "",
        is_dy: ""
      },
      editFormOptions: [
        [
          {
            dataKey: "mall_supplier",
            data: [],
            title: "供应商名称",
            required: true,
            field: "supplier_Name",
            colSize: 6,
            type: "select"
          },
          {
            dataKey: "hotel_Type",
            data: [],
            title: "酒店类型",
            required: true,
            field: "hotel_Type",
            colSize: 6,
            type: "select"
          }
        ],
        [
          {
            title: "是否关联抖音酒店",
            field: "is_dy",
            colSize: 6,
            type: "switch"
          },
          {
            dataKey: "distributorList",
            data: [],
            title: "分销商",
            required: false,
            field: "distributorCode",
            colSize: 6,
            type: "select",
            hidden: false
          }
        ],
        [
          {
            title: "酒店头图",
            maxSize: 1,
            required: false,
            field: "hotel_Image",
            colSize: 4,
            type: "imgupgrade",
            maxFile: 1,
            multiple: true
          },
          {
            title: "酒店名称",
            required: true,
            field: "hotel_Name",
            colSize: 8,
            type: "text"
          },
          {
            title: "酒店ID",
            required: true,
            field: "hotel_ID",
            colSize: 8,
            type: "alphanumeric"
          },
          {
            title: "抖音酒店ID",
            required: true,
            field: "dy_hotel_ID",
            colSize: 8,
            type: "text",
            required: false
          }
        ],
        [
          {
            dataKey: "",
            title: "酒店地址",
            required: true,
            field: "HOTELDETAILADDRESS",
            remote: true,
            data: [],
            hidden: true,
            placeholder: "输入地址关键字段搜索",
            type: "select"
          },
          {
            title: "酒店地址",
            field: "HOTELDETAILADDRESS2",
            readonly: true,
            hidden: true,
            placeholder: "输入地址关键字段搜索",
            type: "text"
          }
        ],
        [
          {
            dataKey: "hotel_Introduction",
            data: [],
            title: "酒店图文介绍",
            required: true,
            field: "hotel_Introduction",
            colSize: 6,
            type: "select"
          },
          {
            title: "前台电话",
            required: true,
            field: "reception_Phone",
            colSize: 6,
            type: "phone"
          }
        ],
        [
          {
            title: "session",
            field: "session",
            colSize: 8
          }
        ],
        [
          {
            dataKey: "hotel_State",
            data: [],
            title: "酒店状态",
            required: true,
            field: "hotel_State",
            colSize: 6,
            type: "radio"
          },
          {
            title: "是否公开",
            field: "is_open",
            colSize: 3,
            type: "switch"
          },
          {
            title: "是否显示",
            field: "isShowRoomDetails",
            colSize: 3,
            type: "switch"
          }
        ],
        [
          {
            title: "直营分销商",
            dataKey: "",
            data: [],
            field: "distributorNews_id",
            colSize: 6,
            type: "selectList",
            hidden: true
          }
        ],
        [
          {
            title: "描述",
            required: true,
            field: "describes",
            colSize: 12,
            type: "textarea"
          }
        ],
        [
          {
            title: "主键",
            required: true,
            field: "id",
            disabled: true,
            type: "number"
          },
          { title: "供应商编码", field: "supplier_Code", disabled: true },
          { title: "修改人", field: "modifier" },
          { title: "修改时间", field: "modifyDate" },
          { title: "修改人ID", field: "modifyID", type: "number" },
          { title: "创建时间", field: "createDate" },
          { title: "创建人ID", field: "createID", type: "number" },
          { title: "创建人", field: "creator" },
          { title: "商户编码", field: "merchantCode" },
          { title: "商户名称", field: "merchantName" }
        ]
      ],
      searchFormFields: {
        supplier_Name: "",
        hotel_Type: "",
        hotel_Name: "",
        describes: "",
        createDate: ""
      },
      searchFormOptions: [
        [
          { title: "酒店名称", field: "hotel_Name", type: "like" },
          {
            dataKey: "mall_supplier",
            data: [],
            title: "供应商名称",
            field: "supplier_Name",
            type: "select"
          },
          {
            dataKey: "hotel_Type",
            data: [],
            title: "酒店类型",
            field: "hotel_Type",
            type: "select"
          }
        ],
        [
          { title: "创建时间", field: "createDate", type: "date" },
          { title: "描述", field: "describes", type: "like" }
        ]
      ],
      columns: [
        {
          field: "hotelid",
          title: "主键",
          type: "int",
          width: 90,
          hidden: true,
          readonly: true,
          require: true,
          align: "left"
        },
        {
          field: "hotel_Name",
          title: "酒店名称",
          type: "string",
          width: 200,
          require: true,
          align: "left"
        },
        {
          field: "supplier_Code",
          title: "供应商编码",
          type: "string",
          width: 150,
          hidden: true,
          readonly: true,
          align: "left"
        },
        {
          field: "supplier_Name",
          title: "供应商名称",
          type: "string",
          bind: { key: "mall_supplier", data: [] },
          width: 120,
          require: true,
          align: "left",
          sortable: true
        },
        {
          field: "hotel_Type",
          title: "酒店类型",
          type: "string",
          bind: { key: "hotel_Type", data: [] },
          width: 80,
          require: true,
          align: "left"
        },
        {
          field: "hotel_ID",
          title: "酒店ID",
          type: "string",
          width: 120,
          require: true,
          align: "left"
        },
        {
          field: "hotel_Image",
          title: "酒店头图",
          type: "imgupgrade",
          width: 90,
          require: false,
          align: "left"
        },
        {
          field: "hotel_detailaddress",
          title: "酒店地点及坐标",
          type: "string",
          width: 400,
          require: true,
          align: "left"
        },
        {
          field: "reception_Phone",
          title: "前台电话",
          type: "string",
          width: 120,
          require: true,
          align: "left"
        },
        {
          field: "hotel_Introduction",
          title: "酒店图文介绍",
          type: "string",
          bind: { key: "hotel_Introduction", data: [] },
          width: 160,
          require: true,
          align: "left"
        },
        {
          field: "hotel_State",
          title: "酒店状态(1 开业 2 停用 3 试营业 4 预开业)",
          type: "int",
          bind: { key: "hotel_State", data: [] },
          width: 80,
          require: true,
          align: "left"
        },
        {
          field: "describes",
          title: "描述",
          type: "string",
          width: 200,
          require: true,
          align: "left"
        },
        {
          field: "modifier",
          title: "修改人",
          type: "string",
          width: 100,
          align: "left"
        },
        {
          field: "modifyDate",
          title: "修改时间",
          type: "datetime",
          width: 160,
          align: "left",
          sortable: true
        },
        {
          field: "modifyID",
          title: "修改人ID",
          type: "int",
          width: 90,
          hidden: true,
          align: "left"
        },
        {
          field: "createDate",
          title: "创建时间",
          type: "datetime",
          width: 160,
          align: "left",
          sortable: true
        },
        {
          field: "createID",
          title: "创建人ID",
          type: "int",
          width: 90,
          hidden: true,
          align: "left"
        },
        {
          field: "creator",
          title: "创建人",
          type: "string",
          width: 100,
          align: "left"
        },
        {
          field: "merchantCode",
          title: "商户编码",
          type: "string",
          width: 220,
          hidden: true,
          align: "left"
        },
        {
          field: "merchantName",
          title: "商户名称",
          type: "string",
          width: 220,
          hidden: true,
          align: "left"
        }
      ],
      hasDetail: false,
      detail: {
        cnName: "房型管理",
        isDetail: false,
        isDetails: false,
        columns: [
          {
            field: "hotelid",
            title: "主键",
            type: "int",
            width: 90,
            hidden: true,
            readonly: true,
            require: true,
            align: "left"
          },
          {
            field: "room_Name",
            title: "房型名称",
            type: "string",
            width: 120,
            edit: { type: "text", keep: true },
            align: "left",
            sortable: true
          },
          {
            field: "anotherName",
            title: "房型别称",
            type: "string",
            width: 120,
            edit: { type: "text", keep: true },
            align: "left",
            sortable: true
          },
          {
            field: "region",
            title: "区域",
            type: "string",
            width: 120,
            edit: { type: "text", keep: true },
            align: "left",
            sortable: true
          },
          {
            field: "room_Code",
            title: "房型编码",
            type: "string",
            width: 120,
            edit: { type: "text" },
            align: "left"
          },
          {
            field: "dy_room_Code",
            title: "抖音房型编码",
            type: "select",
            bind: { key: "", data: [] },
            width: 120,
            align: "left",
            edit: {
              type: "selectList",
              key: "",
              data: [],
              keep: true
            },
            hidden: false
          },
          {
            field: "pms_Room_Code",
            title: "pms房型代码",
            type: "select",
            bind: { key: "pms_Room_Code", data: [] },
            width: 120,
            align: "left",
            edit: {
              type: "selectList",
              key: "pms_Room_Code",
              data: [],
              keep: true
            }
          },
          {
            field: "real_Quantity",
            title: "实际数量",
            type: "int",
            width: 90,
            edit: { type: "number", keep: true },
            align: "left"
          },
          {
            field: "bedroomsNum",
            title: "卧室数量",
            type: "string",
            width: 120,
            edit: { type: "text", keep: true },
            align: "left",
            sortable: true
          },
          {
            field: "lavatoryNum",
            title: "厕所数量",
            type: "string",
            width: 120,
            edit: { type: "text", keep: true },
            align: "left",
            sortable: true
          },
          {
            field: "room_Introduction",
            title: "房型介绍",
            type: "string",
            hidden: true,
            bind: { key: "room_Introduction", data: [] },
            width: 120,
            require: true,
            align: "left"
          },
          {
            field: "imageAddress",
            title: "轮播图",
            type: "imgupgrade",
            width: 200,
            hidden: true,
            require: false,
            align: "left"
          },
          {
            field: "room_direction",
            title: "房间朝向",
            type: "string",
            width: 90,
            hidden: true,
            require: false,
            align: "left"
          },
          {
            field: "room_area",
            title: "房间面积",
            type: "decimal",
            width: 90,
            hidden: true,
            require: false,
            align: "left"
          },
          {
            field: "remark",
            title: "备注",
            type: "string",
            width: 90,
            hidden: true,
            require: false,
            align: "left"
          },
          {
            field: "oldestChild",
            title: "最大儿童数",
            type: "string",
            width: 90,
            hidden: true,
            require: false,
            align: "left"
          },
          {
            field: "Facilities_and_Features",
            title: "设施与功能( 1 无烟房 2 WiFi 3 电话 4 迷你吧 5 送餐)",
            type: "string",
            width: 200,
            hidden: true,
            require: false,
            align: "left"
          },
          {
            field: "createDate",
            title: "创建时间",
            type: "datetime",
            width: 150,
            align: "left",
            hidden: true,
            sortable: true
          },
          {
            field: "createID",
            title: "创建人ID",
            type: "int",
            width: 90,
            hidden: true,
            align: "left"
          },
          {
            field: "creator",
            title: "创建人",
            type: "string",
            width: 120,
            hidden: true,
            align: "left"
          },
          {
            field: "modifyDate",
            title: "修改时间",
            type: "datetime",
            width: 150,
            align: "left",
            hidden: true,
            sortable: true
          },
          {
            field: "modifier",
            title: "修改人",
            type: "string",
            width: 120,
            hidden: true,
            align: "left"
          },
          {
            field: "modifyID",
            title: "修改人ID",
            type: "int",
            width: 90,
            hidden: true,
            align: "left"
          },
          {
            field: "typeName",
            title: "产品类型名称",
            link: true,
            type: "string",
            width: 150,
            hidden: true,
            align: "left"
          },
          {
            field: "typeCode",
            title: "产品类型编码",
            type: "string",
            width: 150,
            hidden: true,
            align: "left"
          },
          {
            field: "isAvailable",
            title: "是否可用",
            type: "sbyte",
            width: 90,
            hidden: true,
            require: true,
            align: "left"
          },
          {
            field: "room_picture",
            title: "头图",
            type: "imgupgrade",
            width: 90,
            hidden: true,
            align: "left"
          },
          {
            field: "latitude",
            title: "经纬度",
            type: "string",
            width: 220,
            hidden: true,
            align: "left"
          },
          {
            field: "people_Number",
            title: "房间最多可住人数",
            type: "int",
            width: 90,
            hidden: true,
            align: "left"
          }
        ],
        sortName: "createDate",
        key: "id"
      }
      //    detail: {
      //         cnName:"房型管理2",
      //         columns: [],
      //         sortName: "",
      //         key:""
      //     }
    };
  }
};
export default vueParam;
</script>
